#ifndef GY_SELECTTREEDIALOG_H
#define GY_SELECTTREEDIALOG_H

#include <QDialog>

namespace Ui {
class GY_SelectTreeDialog;
}

class GY_SelectTreeDialog : public QDialog
{
    Q_OBJECT

public:
    enum TaskTreeColumns{NodeName  //节点名称
                         , GroupId  //分类Id
                        };
    explicit GY_SelectTreeDialog(QVector<QVector<QVariant>> nodes, QString oldPid, QWidget *parent = nullptr);
    ~GY_SelectTreeDialog();

    QString getGroupName() const;

    int getGroupId() const;

private slots:

    void on_treeWidget_clicked(const QModelIndex &index);

    void on_pushButton_reject_clicked();

    void on_pushButton_accept_clicked();

    void on_pushButton_root_clicked();

private:
    Ui::GY_SelectTreeDialog *ui;
    QVector<QVector<QVariant>> nodes;
    QString groupName;
    int groupId = 0;
};

#endif // GY_SELECTTREEDIALOG_H
